package com.shaw.tiger;

public class iteratorPatternDemo {

	public static void main(String[] args) {
		NameRepository<Object> nameRepository = new NameRepository<Object>();

		Object[] i = { 1, 2, 3, 4, 5 };
		nameRepository.setNames(i);

		for (Iterator<Object> iter = nameRepository.getIterator(); iter.hasNext();) {
			int name = (int) (iter.next());
			System.out.println("Name :" + name);
			
		}
	}

}
